<template>
	<view>
		<view class="search">
			<u-search placeholder="请输入艺术家姓名" border-color="#c6100e" v-model="keyword" :clearabled="true"></u-search>
		</view>
		
		<view class="tab-bar">
			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#c6100e" height="80" bg-color="#f8f8f8" @change="change"></u-tabs>
		</view>
		
		<!-- 全部艺术家模块 -->
    <view class="c1-list" v-if="current == 0">
    	<view class="list">
    	<view class="c1" v-for="(item,index) in auction" :key=index>
    	 <image src="../../../static/007.jpg" mode="" class="c1-image"></image>
    	 <view class="c1-text">
    	 	<text>{{item.name}}</text>
    	 </view>
    	 <view class="c1-introduce">
    	 	<text>{{item.introduce}}</text>
    	 </view>
    	</view>
    	</view>
			
			<view class="list">
			<view class="c1" v-for="(item,index) in auction" :key=index>
			 <image src="../../../static/007.jpg" mode="" class="c1-image"></image>
			 <view class="c1-text">
			 	<text>{{item.name}}</text>
			 </view>
			 <view class="c1-introduce">
			 	<text>{{item.introduce}}</text>
			 </view>
			</view>
			</view>
    </view>
		
	
	<!-- 推荐艺术家模块 -->
   <view class="c1-list" v-if="current == 1">
    	<view class="list">
    	<view class="c1" v-for="(item,index) in auction" :key=index>
    	 <image src="../../../static/person.png" mode="" class="c1-image"></image>
    	 <view class="c1-text">
    	 	<text>{{item.name}}</text>
    	 </view>
			 <view class="c1-introduce">
			 	<text>{{item.introduce}}</text>
			 </view>
    	</view>
    	</view>
			
			<view class="list">
			<view class="c1" v-for="(item,index) in auction" :key=index>
			 <image src="../../../static/person.png" mode="" class="c1-image"></image>
			 <view class="c1-text">
			 	<text>{{item.name}}</text>
			 </view>
			 <view class="c1-introduce">
			 	<text>{{item.introduce}}</text>
			 </view>
			</view>
			</view>
    </view>
		<diy-bottom-nav></diy-bottom-nav>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				keyword: '',
				auction:[
				{
					name:"马骏",
					introduce:"中国美术家协会四川分会会员、四川省中学教师"
				},
				{
					name:"王绣",
					introduce:"中国美术家协会会员、国家一级美术师"
				}
				],
			list: [
				{
				name: '推荐艺术家'
			  }, 
				{
				name: '全部艺术家',
			  }
			],
			current: 0
			}
		},
		methods: {
			change(index) {
					this.current = index;
			}
		}
	}
</script>

<style lang="scss" scoped>
	.search {
		width: 90%;
		margin: 5%;
	}
	
	.tab-bar {
		margin-top: 20rpx;
	}
	
	.list {
		display: flex;
		justify-content: space-between;
		margin-top: 40rpx;
		width: 90%;
	}
	
	.list .c1 {
		width: 346rpx;
		border-radius: 10rpx;
		background-color: #fefffe;
		height: 522rpx;
		margin-left: 3%;
	}
	
	.c1 .c1-image {
		width: 346rpx;
		height: 346rpx;
		border-radius: 10rpx 10rpx 0 0 ;
	}
	
	.c1 .c1-text{
		margin-left: 20rpx;
		font-size: 28rpx;
	}
	
	.c1 .c1-introduce {
		margin-left: 20rpx;
		color: #939393;
		font-size: 28rpx;
	}
	
</style>